package com.yzy.soft.system.controller;


import com.yzy.soft.core.base.controller.BaseController;
import com.yzy.soft.system.monitor.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author yinzhiyuan
 * @since 2018-02-01
 */
@RestController
@RequestMapping("/system")
public class SystemController extends BaseController {
    private static final Logger logger= LoggerFactory.getLogger(SystemController.class);
//    @Autowired
//    private AccountMapper accountMapper;


    @GetMapping("/diskInfo")
    public DiskInfo getDiskInfo() {
        return new Disk().getDiskInfo();
    }

    @GetMapping("/cpuInfo")
    public CpuInfo getCpuInfo() throws Exception{
        return new Cpu().getCpuInfo();
    }

    @GetMapping("/memoryInfo")
    public ParticularMemoryInfo getMemoryInfo() throws Exception{
        return new Memory().getMemoryInfo();
    }

}